﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace Studentium.Entities
{
    public enum BookType
    {
        Unknown,
        WorkBook,
        StudentBook
    };
    public class Payment
    {
        private int id;
        private Student student;
        private int weekStarted;
        private DateTime startDate;
        private DateTime finishDate;
        private int moneyPaid;
        private int price;
        private int discount;
        private string discountReferer;
        private string comment;
        private bool isCoursePayment;
        private int classesNumber;
        private bool isBookPayment;
        private BookType bookType;
        private StudentLevel bookLevel;

        [Browsable(false)]
        public virtual int Id
        {
            get { return id; }
            set { id = value; }
        }
        
        [Browsable(false)]
        public virtual Student Student
        {
            get { return student; }
            set { student = value; }
        }

        [DisplayName("Course Payment")]
        public virtual bool IsCoursePayment
        {
            get { return isCoursePayment; }
            set { isCoursePayment = value; }
        }

        public virtual string Comment
        {
            get { return comment; }
            set { comment = value; }
        }

        [DisplayName("Week Started")]
        public virtual int WeekStarted
        {
            get { return weekStarted; }
            set { weekStarted = value; }
        }

        [DisplayName("Start date")]
        public virtual DateTime StartDate
        {
            get { return startDate; }
            set { startDate = value; }
        }

        [DisplayName("Finish date")]
        public virtual DateTime FinishDate
        {
            get { return finishDate; }
            set { finishDate = value; }
        }

        [DisplayName("Money paid")]
        public virtual int MoneyPaid
        {
            get { return moneyPaid; }
            set { moneyPaid = value; }
        }

        public virtual int Discount
        {
            get { return discount; }
            set { discount = value; }
        }

        [DisplayName("Discount referer")]
        public virtual string DiscountReferer
        {
            get { return discountReferer; }
            set { discountReferer = value; }
        }

        public virtual int Price
        {
            get { return price; }
            set { price = value; }
        }

        public virtual int ClassesNumber
        {
            get { return classesNumber; }
            set { classesNumber = value; }
        }

        [DisplayName("Book payment")]
        public bool IsBookPayment
        {
            get { return isBookPayment; }
            set { isBookPayment = value; }
        }

        public BookType BookType
        {
            get { return bookType; }
            set { bookType = value; }
        }

        public StudentLevel BookLevel
        {
            get { return bookLevel; }
            set { bookLevel = value; }
        }

        public Payment()
        {
        }

        public Payment(Student student)
        {
            this.student = student;
        }
    }
}
